import Vue from 'vue'
import Router from 'vue-router'
import Index from '@/views/Index'
import LoginIndex from '@/views/Login/index'
import LoginRegister from '@/views/Login/register'
import Sindex from '@/views/SystemSet/index'
import Shome from '@/views/SystemSet/home'
import SMinfo from '@/views/SystemSet/MerchantInfo/info'
import SMreg from '@/views/SystemSet/MerchantInfo/reg'
import SMcontract from '@/views/SystemSet/MerchantInfo/contract'
import SGgoodsaddscenic from '@/views/SystemSet/GoodsMag/goodsadd-scenic'
import SGgoodsselect from '@/views/SystemSet/GoodsMag/goodsselect'
import SGgoodsaddhotel from '@/views/SystemSet/GoodsMag/goodsadd-hotel'
import UserMag from '@/views/SystemSet/UserMag/usermag'
import UserSet from '@/views/SystemSet/UserMag/userset'
import Oindex from '@/views/SystemSet/OrderMag/index'
import Oticket from '@/views/SystemSet/OrderMag/ticket'
import OorderDetails from '@/views/SystemSet/OrderMag/OrderDetails'
import FMlist from '@/views/SystemSet/FinanceMag/list'
import FMdetails from '@/views/SystemSet/FinanceMag/details'



Vue.use(Router)
export default new Router({
	mode: 'history',
	routes: [{
			path: '/',
			// redirect: '/index',
			name: 'Index',
			component: Index,
			meta: {
				title: "首页"
			}
		}, {
			path: '/LoginIndex',
			name: 'LoginIndex',
			component: LoginIndex,
			meta: {
				title: "登录"
			}
		}, {
			path: '/LoginRegister',
			name: 'LoginRegister',
			component: LoginRegister,
			meta: {
				title: "注册"
			}
		}, {
			path: '/Sindex',
			name: 'Sindex',
			component: Sindex,
			children: [{
				path: '/index',
				name: 'Shome',
				component: Shome,
				meta: {
					title: "首页"
				}
			}, {
				path: '/SMreg',
				name: 'SMreg',
				component: SMreg,
				meta: {
					title: "商户注册"
				}
			}, {
				path: '/SMinfo/:type',
				name: 'SMinfo',
				component: SMinfo,
				meta: {
					title: "商户详情",
				}
			}, {
				path: '/SMcontract',
				name: 'SMcontract',
				component: SMcontract,
				meta: {
					title: "合同管理"
				}
			}, {
				path: '/SGgoodsadd-scenic',
				name: 'SGgoodsaddscenic',
				component: SGgoodsaddscenic,
				meta: {
					title: "添加产品-景区"
				}
			}, {
				path: '/SGgoodsselect',
				name: 'SGgoodsselect',
				component: SGgoodsselect,
				meta: {
					title: "产品查询"
				}
			}, {
				path: '/SGgoodsadd-hotel',
				name: 'SGgoodsaddhotel',
				component: SGgoodsaddhotel,
				meta: {
					title: "添加产品-酒店"
				}
			}, {
				path: '/UserMag',
				name: 'UserMag',
				component: UserMag,
				meta: {
					title: "用户管理"
				}
			}, {
				path: '/UserSet/:type',
				name: 'UserSet',
				component: UserSet,
				meta: {
					title: "权限设置"
				}
			}, {
				path: '/Oindex',
				name: 'Oindex',
				component: Oindex,
				children: [{
					path: '/Oticket',
					name: 'Oticket',
					component: Oticket,
					meta: {
						title: "门票验证"
					}
				}, {
					path: '/OorderDetails/:type',
					name: 'OorderDetails',
					component: OorderDetails,
					meta: {
						title: "客户下单明细"
					}
				}, ]
			}, {
				path: '/FMlist/:type',
				name: 'FMlist',
				component: FMlist,
				meta: {
					title: "财务明细",
				}
			},{
				path: '/FMdetails',
				name: 'FMdetails',
				component: FMdetails,
				meta: {
					title: "财务详情"
				}
			}, ]
		},


	]
})
